Displaying graphics when a disc directory is listed

There are two instructions to display a directory of a disc:

The differences between these two commands are listed below.

CAT

Example output using CAT command:

cat

Drive A: user  0

CATALOG .ASM   4K   SCROLL  .BAK   2K
HWSPRITE.ASM*  4K   SPLTSCRN.ASM   3K
SCROLL  .ASM   2K

163K free

Ready

Notes:

|DIR

Example output using |DIR command:

|dir

Drive A: user  0

HWSPRITE.ASM   CATALOG .ASM
SPLTSCRN.ASM   SCROLL  .ASM

163K free

Ready

Notes:

Displaying text and graphics using CAT and/or |DIR

The standard DATA and SYSTEM formats have 64 directory entries.

The following procedure is used to display a directory listing:

  1. Display blank line
  2. Display "Drive " followed by drive letter ("A" or "B")
  3. Display ":" character
  4. Display " user " followed by user number (the user number is displayed padded with spaces) e.g. " 0", " 15"
  5. Display blank line
  6. if CAT:
  7. if |DIR:
  8. The following procedure is repeated for each filename:

If you want the output to look identical with CAT and |DIR, follow these rules:

OffsetCountDescription
01User number (set to "0")
11Sort key (use the characters with ASCII codes 32-127 in ascending order)
21ACK control code (enable printing of characters)
3..86(useable)
96BS (to erase "." character)
101(useable)
111NAK
12..3119not used (set to "0")